<%@ page language="java" pageEncoding="UTF-8"%>
<%@include file="/page/util/include.jsp" %>

<link rel="stylesheet" type="text/css" href="../../ui/css/containers.css" />
<link rel="stylesheet" type="text/css" href="../../ui/css/base.css" />
<link rel="stylesheet" type="text/css" href="../../ui/css/jqzoom.css" />
<script src="../../ui/js/jQuery-1.3.2.js" language="javascript" type="text/javascript"></script>
<script src="../../ui/js/newegg.jqzoom.js" language="javascript" type="text/javascript"></script>
<script src="../../ui/js/WebApplication.js" language="javascript" type="text/javascript"></script>
<script src="../../ui/js/BizProduct090713.js" language="javascript" type="text/javascript"></script>
<script src="../../ui/js/BizCommon090801.js" language="javascript" type="text/javascript"></script>
<script type="text/javascript">
function ajaxStatusFun(productId){
	var statusId = ($("#productStatusId").html()=="下架")?1:0;
	var message=(statusId==1)?"您确定要下架吗？":"您确定要上架吗？";
	var flag = confirm(message);
	if(!flag){
		return;
	}
	$.ajax({
		type: "post", 
		url: "${pageContext.request.contextPath}/page/shop/updateProductStatus",
		data:{productId:productId,statusId:statusId},
		success:function(request){
			$("#productStatusId").html((statusId==1)?"上架":"下架");
		}
	});
}
</script>

  <div class="woRegion" style="width:993px; _margin-top:-12px;">
   <div class="woMenu_top">
      <div class="woMenu_topLeft"></div>
      <div class="woMenu_topMiddle" style="width:985px;">
        <div class="woMenu_topMiddle_Title">产品详情</div>
        <div class="woMenu_operation"><a href="#">产品列表</a>|<a href="orderForm.html">返回首页</a></div> 
      </div>
      <div class="woMenu_topRight"></div>
    </div>
   <div class="woMenu_middle2" style="width:989px;">
     <div class="detailsBg">
       <div class="details_info">
         <div class="details_left">
           <div class="details_name"><c:out value="${product_info.productName}" /></div>
           <div class="introShow">
             <div class="mainShow"><a id="bigImg" href="images/01.jpg" class="jqzoom"> <img id="midImg" src="../../ui/images/01.jpg" class="Picture220"/></a></div>
             <div class="scroll" id="scroll"><a href="#prev" class="prevView prevStop" ><span>显示上一幅图片</span></a>
               <ul id="thumList" style="width:225px; margin-left:2px; padding-left:2px;">
                 <li class="moveUnit"><a href="javascript:void(0)" title="" class="currentItem">
                 <img src="../../ui/images/01.jpg" alt="" ref1="images/01.jpg" ref2="images/01.jpg" onMouseOver="Biz.Product.Product.ChangePic(this);" class="Picture40"/></a></li>
                 <li class="moveUnit"><a href="javascript:void(0)" title="" class="currentItem">
                 <img src="../../ui/images/02.jpg" alt="" ref1="images/02.jpg" ref2="images/02.jpg" onMouseOver="Biz.Product.Product.ChangePic(this);" class="Picture42"/></a></li>
                 <li class="moveUnit"><a href="javascript:void(0)" title="" class="currentItem">
                 <img src="../../ui/images/03.jpg" alt="" ref1="images/03.jpg" ref2="images/03.jpg" onMouseOver="Biz.Product.Product.ChangePic(this);" class="Picture40"/></a></li>
                 <li class="moveUnit"><a href="javascript:void(0)" title="" class="currentItem">
                 <img src="../../ui/images/04.jpg" alt="" ref1="images/04.jpg" ref2="images/04.jpg" onMouseOver="Biz.Product.Product.ChangePic(this);" class="Picture40"/></a></li>
                 <li class="moveUnit"><a href="javascript:void(0)" title="" class="currentItem">
                 <img src="../../ui/images/01.jpg" alt="" ref1="images/01.jpg" ref2="images/01.jpg" onMouseOver="Biz.Product.Product.ChangePic(this);" class="Picture42"/></a></li>
                 <li class="moveUnit"><a href="javascript:void(0)" title="" class="currentItem">
                 <img src="../../ui/images/02.jpg" alt="" ref1="images/02.jpg" ref2="images/02.jpg" onMouseOver="Biz.Product.Product.ChangePic(this);" class="Picture40"/></a></li>
                 <li class="moveUnit"><a href="javascript:void(0)" title="" class="currentItem">
                 <img src="../../ui/images/03.jpg" alt="" ref1="images/03.jpg" ref2="images/03.jpg" onMouseOver="Biz.Product.Product.ChangePic(this);" class="Picture40"/></a></li>
                 <li class="moveUnit"><a href="javascript:void(0)" title="" class="currentItem">
                 <img src="../../ui/images/04.jpg" alt="" ref1="images/04.jpg" ref2="images/04.jpg" onMouseOver="Biz.Product.Product.ChangePic(this);" class="Picture42"/></a></li>
                 <li class="moveUnit"><a href="javascript:void(0)" title="" class="currentItem">
                 <img src="../../ui/images/03.jpg" alt="" ref1="images/03.jpg" ref2="images/03.jpg" onMouseOver="Biz.Product.Product.ChangePic(this);" class="Picture40"/></a></li>
               </ul>
               <a href="#next" class="nextView nextStop" ><span>显示下一幅图片</span></a></div>
           </div>
         </div>
         <div class="details_middle">
           <table width="100%" style="width:400px;" border="0" cellspacing="0" cellpadding="0">
             <tr height="40">
               <td width="25%" align="right">价格：</td>
               <td width="3%" align="right">&nbsp;</td>
               <td width="72%"><font class="details_pice">
               	<fmt:formatNumber value="${product_info.discountPrice}" type="currency"/></font>
               </td>
             </tr>
             <tr height="40">
               <td align="right">原价：</td>
               <td align="right">&nbsp;</td>
               <td><font class="through"><fmt:formatNumber value="${product_info.discountPrice}" type="currency"/></font></td>
             </tr>
             <tr height="40">
               <td align="right">已购买：</td>
               <td align="right">&nbsp;</td>
               <td>380 份</td>
             </tr>
             <tr height="40">
               <td align="right">商品评价：</td>
               <td align="right">&nbsp;</td>
               <td>
               	<img src="../../ui/images/star1.gif" />
                <img src="../../ui/images/star1.gif" /> 
               	<img src="../../ui/images/star1.gif" />
                <img src="../../ui/images/star2.gif" />
                <img src="../../ui/images/star2.gif" />
                <a href="#">(已有1573人评价)</a></td>
             </tr>
             <tr height="40">
               <td align="right">浏览人数：</td>
               <td align="right">&nbsp;</td>
               <td>456人</td>
             </tr>
             <tr height="40">
               <td align="right">付款方式：</td>
               <td align="right">&nbsp;</td>
               <td><font class="detailsPayment">在线付款</font><font class="detailsPayment">预定位置</font><font class="detailsPayment">送货上门</font></td>
             </tr>
           </table>
         </div>
         <div class="details_right">
           <table width="100%"  style="margin-top:30px;" border="0" cellspacing="0" cellpadding="0">
             <tr height="55">
               <td width="35%" align="right"><img src="../../ui/images/Edit1.gif" /></td>
               <td width="65%">
               <a href="${pageContext.request.contextPath}/page/shop/preUpdateProductInfo?productId=${product_info.productId}">编辑</a></td>
             </tr>
             <tr height="55">
               <td align="right"><img src="../../ui/images/Edit2.gif" /></td>
               <td>
               	<c:if test="${product_info.statusId==1}">
               	<a id="productStatusId" onclick="ajaxStatusFun(${product_info.productId})" 
               		href="javascript:void(0);">下架</a>
                </c:if>
                <c:if test="${product_info.statusId==0}">
               	<a id="productStatusId" onclick="ajaxStatusFun(${product_info.productId})" 
               		href="javascript:void(0);">下架</a>
                </c:if>
               </td>
             </tr>
             <tr height="55">
               <td align="right"><img src="../../ui/images/Edit3.gif" /></td>
               <td><a href="#">推广</a></td>
             </tr>
           </table>
         </div>
       </div>
       <div class="detailsBrief">
         <div class="DetailsBut">简介</div>
         <div class="detailsBrief_info">
         	<c:out value="${product_info.productBrief}" />
            <br />
            <c:out value="${comment_json}" />
         </div>
       </div>
       <div class="detailsBrief">
         <div class="DetailsBut">评论</div>
         <div class="LeaveMessage_info" style="padding-left:0px;">
<script type="text/javascript">
$(document).ready(function(){
   var json1=eval('('+'${comment_json}'+')');//转换为json对象 
   // alert(json1.total);
});
</script>

         
           <div class="LeaveMessage_info_list">
             <div class="LeaveMessage_info_img">
               <div class="LeaveMessage_Ico"><img src="../../ui/images/leaveIco_04.jpg" /></div>
               <div style="width:83px; color:#838585; margin-top:8px; font-weight:700; text-align:center;">会飞的鱼</div>
             </div>
             <div class="LeaveMessage_info_details">
               <div class="LeaveMessage_info_top">
                 <ul class="leaveMessagee_ul">
                   <li>评价</li>
                   <li> <img src="../../ui/images/star1.gif" /> <img src="../../ui/images/star1.gif" /> <img src="../../ui/images/star1.gif" /> <img src="../../ui/images/star2.gif" /> <img src="../../ui/images/star2.gif" /> </li>
                   <li><font style="color:#F60; font-weight:700; margin-right:5px;">不满意</font></li>
                   <li><font class="comment_font">口味：</font>一般</li>
                   <li><font class="comment_font">服务：</font>很好</li>
                   <li><font class="comment_font">环境：</font>很差</li>
                   <li style="float:right;color:#999;">2012-07-05 22:30</li>
                 </ul>
               </div>
               <div class="LeaveMessage_info_middle">
                 <div class="commentContent2">你们店的这个菜，口味实在是太差了，菜很老，下次你们应该好好改进一下，环境也不好，服务到时蛮热情的。</div>
                 <div class="ommentReply"><a href="#">举报</a>
                   <input  type="button" class="commentReplyBut" value="回复"/>
                 </div>
                 <div class="commentContent">我回复：很感谢对我们店的评论，您的建议我们会尽力改进</div>
               </div>
               <div class="LeaveMessage_info_bottom"></div>
             </div>
           </div>
           <div class="LeaveMessage_info_list">
             <div class="LeaveMessage_info_img">
               <div class="LeaveMessage_Ico"><img src="../../ui/images/leaveIco_14.jpg" /></div>
               <div style="width:83px; color:#838585; margin-top:8px; font-weight:700; text-align:center;">会飞的鱼</div>
             </div>
             <div class="LeaveMessage_info_details">
               <div class="LeaveMessage_info_top">
                 <ul class="leaveMessagee_ul">
                   <li>评价</li>
                   <li>
                   		<img src="../../ui/images/star1.gif" />
                        <img src="../../ui/images/star1.gif" />
                        <img src="../../ui/images/star1.gif" />
                        <img src="../../ui/images/star2.gif" />
                        <img src="../../ui/images/star2.gif" /></li>
                   <li><font style="color:#F60; font-weight:700; margin-right:5px;">不满意</font></li>
                   <li><font class="comment_font">口味：</font>一般</li>
                   <li><font class="comment_font">服务：</font>很好</li>
                   <li><font class="comment_font">环境：</font>很差</li>
                   <li style="float:right;color:#999;">2012-07-05 22:30</li>
                 </ul>
               </div>
               <div class="LeaveMessage_info_middle">
                 <div class="commentContent2">你们店的这个菜，口味实在是太差了，菜很老，下次你们应该好好改进一下，环境也不好，服务到时蛮热情的。</div>
                 <div class="ommentReply"><a href="#">举报</a>
                   <input  type="button" class="commentReplyBut" value="回复"/>
                 </div>
                 <div class="commentContent">我回复：很感谢对我们店的评论，您的建议我们会尽力改进</div>
               </div>
               <div class="LeaveMessage_info_bottom"></div>
             </div>
           </div>
         </div>
       </div>
     </div>
     <jsp:include page="../util/paging.jsp" flush="false">
      	<jsp:param name="sge" value="1"/>
     </jsp:include>
   </div>
  </div>
<script type="text/javascript" language="jscript">
var productUrl='http://www.newegg.com.cn/Product/paramForProductID.htm';

jQuery(function($) {
    Biz.Product.Product.turn();
    Biz.Product.Product.turn2();
    Biz.Common.TabCtrl.tabs("tab");
	Biz.Common.TabCtrl.tabs("tempTab");
	Biz.Common.MoveCtrl.iniUnit('scroll', 'thumList', 4, 1);
	Biz.Common.MoveCtrl.iniUnit('gift', 'gift_1', 3, 1);
    Biz.Common.MoveCtrl.iniUnit('congener', 'congener_1', 3, 1);
    Biz.Common.TableCtrl.odd();	
    Biz.Product.Product.InitSpecialTable();
    Biz.Product.Product.InitAlsoBuy();

	//Click out event!
	$("#backgroundPopup").click(function(){
		Biz.Common.PopCtrl.disablePopup();
		});
		
	//Press Escape event!
	$(document).keypress(function(e){
		if(e.keyCode==27 && popupStatus==1){
			Biz.Common.PopCtrl.disablePopup();
		}
	});
	
    var options = {
    zoomWidth: 300,
    zoomHeight: 250,
        xOffset: 20,
        yOffset: -15,
        title : false,
		showEffect:"fadein",
		hideEffect:"fadeout",
        position: "right" 
	}
	$(".jqzoom").jqzoom(options);
	
	Biz.Product.ProductDetail.Delay('44891','健康休闲');
}); 
</script>
